﻿namespace Bamboo.Core
{
    public interface IRule<TEntity>
    {
        /// <summary>
        /// Rule name
        /// </summary>
        string Name { get; }

        /// <summary>
        /// Rule description (should be a constant string)
        /// </summary>
        string Description { get; }

        /// <summary>
        /// Verifies the given entity against pre-defined rules (defined via RuleManager).
        /// </summary>
        /// <param name="entity">Entity to verify</param>
        /// <returns>true if all passes; false otherwise</returns>
        bool Validate(TEntity entity);

    }
}
